package cn.wolfcode.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
@ToString
public class Employee {
    private Long id;
    private String name;
    private String password;
    private String email;
    private Integer age;
    private boolean admin;
   /*关联部门属性，就可以封装部门id和部门名称*/
   private Department dept;
   private boolean status;

   private List<Role> roles = new ArrayList<>();

   public String getStatusName(){
       if(status){
           return "正常";
       }
       return "禁用";
   }
}